package com.jy.wms.web;

import com.jy.wms.service.SysMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @ClassName: UserController
 * @Description: TODO(这里用一句话描述这个类的作用)
 * @Author lh
 * @Date 2018/8/6 0006
 */
@Controller
@RequestMapping("/wmsInventoryplanRouter")
public class WmsInventoryplanRouter {
    @Autowired
    SysMenuService menuService;
    /* 跳转到盘点计划页面*/
    @RequestMapping(value = "/toInventoryList/{menu}")
    public String inventoryList(@PathVariable("menu") String menu, Model model){
        model.addAttribute("functions",menuService.getFunctions(menu));
        return "stock/inventoryPlan/inventoryList";
    }
    /* 跳转到新增盘点页面*/
    @RequestMapping(value = "/toAddInventoryPlan")
    public String addInventoryPlan(){
        return "stock/inventoryPlan/addInventoryPlan";
    }
    /* 跳转到下发盘点任务页面*/
    @RequestMapping(value = "/toXiafaRw")
    public String toXiafaRw(String id, Model model){
        model.addAttribute("id",id);
        return "stock/inventoryPlan/xiafaRw";
    }
    /* 跳转到库存盘点页面*/
    @RequestMapping(value = "/toStockPd")
    public String toStockPd(String id, Model model){
        model.addAttribute("pid",id);
        return "stock/inventoryPlan/stockPd";
    }
    /* 跳转到详细信息页面*/
    @RequestMapping(value = "/toDetail")
    public String toDetail(String pdhbid, Model model){
        model.addAttribute("pdhbid",pdhbid);
        return "stock/inventoryPlan/detail";
    }
    /* 跳转到查看生成库存调整单页面*/
    @RequestMapping(value = "/toStockTzd")
    public String toStockTzd(String planId, Model model){
        model.addAttribute("planId",planId);
        return "stock/inventoryPlan/stockTzd";
    }
}
